package com.moneywelcome.atomloanfacade.api;

import com.moneywelcome.atomloanfacade.param.UpdateAmortizationParam;
import com.moneywelcome.results.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.text.ParseException;

@Api(tags = "还款服务")
@FeignClient(value = "atom-loan",contextId = "RepayApi")
public interface RepayApi {

    @ApiOperation("通过id查询用户贷款信息，自动刷新，通过id查询修改用户贷款出账信息")
    @GetMapping("/finduserRepay/{userId}")
    Result findandupdateAmortizationbyId(@PathVariable("userId")Integer userId) throws ParseException;


    @ApiOperation("用户还款后修改分期信息接口")
    @PostMapping("/afterRepay/{userId}")
    Result afterRepay(@PathVariable("userId")Integer userId);

}
